function GetDateStr(AddDayCount) {
	var dd = new Date();
	dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
	var y = dd.getFullYear();
	var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期，不足10补0
	var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号，不足10补0
  return `${y}-${m}-${d}`;
}
/*获取状态中文*/
function getExamStatusHtml(status) {
	switch(status) {
		case "00":
      return "<a-tag color='#b5a083'>取消检查</a-tag>";
			break;
		case "10":
      return "<a-tag color='#999999'>预约确认</a-tag>";
			break;
		case "20":
      return "<a-tag color='#666666'>已经报到</a-tag>";
			break;
		case "30":
      return "<a-tag color='#444444'>登记信息</a-tag>";
			break;
		case "40":
      return "<a-tag color='#afddf7'>叫号完成</a-tag>";
			break;
		case "50":
      return "<a-tag color='#46d0e2'>正在检查</a-tag>";
			break;
		case "55":
      return "<a-tag color='#7090a9'>正在传输</a-tag>";
			break;
		case "57":
      return "<a-tag color='#e03e5e'>传输失败</a-tag>";
			break;
		case "60":
      return "<a-tag color='#27455d'>收到影像</a-tag>";
			break;
		case "65":
      return "<a-tag color='#ff5722'>审核退回</a-tag>";
			break;
		case "70":
      return "<a-tag color='#73e477'>初步报告</a-tag>";
			break;
		case "80":
      return "<a-tag color='#32bd37'>审核报告</a-tag>";
			break;
		case "90":
      return "<a-tag color='#09650c'>发布报告</a-tag>";
			break;
		case "95":
      return "<a-tag color='#033c05'>报告打印</a-tag>";
			break;
		default:
      return "<a-tag color='#dcb173'>无效状态</a-tag>";
	}
}

/*日期时间函数*/
function ForMatDate(timestamp) {
	var time = new Date(timestamp);
	var year = time.getFullYear();
	var month = (time.getMonth() + 1) > 9 && (time.getMonth() + 1) || ('0' + (time.getMonth() + 1))
	var date = time.getDate() > 9 && time.getDate() || ('0' + time.getDate())
	var hour = time.getHours() > 9 && time.getHours() || ('0' + time.getHours())
  var minute = time.getMinutes() > 9 && time.getMinutes() || ('0' + time.getMinutes());
  return `${year}-${month}-${date} ${hour}:${minute}`;
}

function ForMat(timestamp){
  var time = new Date(timestamp);
	var year = time.getFullYear();
	var month = (time.getMonth() + 1) > 9 && (time.getMonth() + 1) || ('0' + (time.getMonth() + 1))
	var date = time.getDate() > 9 && time.getDate() || ('0' + time.getDate())
  return `${year}-${month}-${date}`;
}
export{
  GetDateStr,getExamStatusHtml,ForMatDate,ForMat
}
